package com.xiaor.rssredarea.service.impl;

import com.xiaor.rssredarea.dao.RedAreaDao;
import com.xiaor.rssmodel.model.RedArea;
import com.xiaor.rssredarea.service.RedAreaService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RedAreaServiceImpl implements RedAreaService {
    @Autowired
    private RedAreaDao redAreaDao;
    private static Logger logger = LoggerFactory.getLogger(RedAreaServiceImpl.class);

    @Override
    public RedArea findByName(RedArea redArea) {
        logger.info("findByName");
        return redAreaDao.findByName(redArea);
    }

    @Override
    public List<RedArea> findAll() {
        logger.info("findAll");
        return redAreaDao.findAll();
    }
}
